import { defineComponent } from 'vue';

/** 图标 */
export const LdIcon = defineComponent({
    props: {
        /** 图标名称 */
        name: {
            type: String,
            required: true
        }
    },
    setup(props, { attrs }) {

        return () => (<>
            <svg {...attrs} class="icon" aria-hidden="true">
                <use {...{} as any} xlink:href={`#${props.name}`}></use>
            </svg>
        </>);
    }
})